\(\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx\) [304]
Optimal result
Integrand size = 26, antiderivative size = 351 \[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {f x}{4 b d}+\frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a f \cos (c+d x)}{b^2 d^2}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d}+\frac {i \left (a^2-b^2\right ) f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d^2}+\frac {i \left (a^2-b^2\right ) f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d^2}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {f \cos (c+d x) \sin (c+d x)}{4 b d^2}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d}
\]
[Out]
1/4*f*x/b/d+1/2*I*(a^2-b^2)*(f*x+e)^2/b^3/f+a*f*cos(d*x+c)/b^2/d^2-(a^2-b^2)*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(
a-(a^2-b^2)^(1/2)))/b^3/d-(a^2-b^2)*(f*x+e)*ln(1-I*b*exp(I*(d*x+c))/(a+(a^2-b^2)^(1/2)))/b^3/d+I*(a^2-b^2)*f*p
olylog(2,I*b*exp(I*(d*x+c))/(a-(a^2-b^2)^(1/2)))/b^3/d^2+I*(a^2-b^2)*f*polylog(2,I*b*exp(I*(d*x+c))/(a+(a^2-b^
2)^(1/2)))/b^3/d^2+a*(f*x+e)*sin(d*x+c)/b^2/d-1/4*f*cos(d*x+c)*sin(d*x+c)/b/d^2-1/2*(f*x+e)*sin(d*x+c)^2/b/d
Rubi [A] (verified)
Time = 0.28 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.00, number of
steps used = 13, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {4621, 3377, 2718, 4489,
2715, 8, 4615, 2221, 2317, 2438} \[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {i f \left (a^2-b^2\right ) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d^2}+\frac {i f \left (a^2-b^2\right ) \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d^2}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b^3 d}+\frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a f \cos (c+d x)}{b^2 d^2}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {f \sin (c+d x) \cos (c+d x)}{4 b d^2}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d}+\frac {f x}{4 b d}
\]
[In]
Int[((e + f*x)*Cos[c + d*x]^3)/(a + b*Sin[c + d*x]),x]
[Out]
(f*x)/(4*b*d) + ((I/2)*(a^2 - b^2)*(e + f*x)^2)/(b^3*f) + (a*f*Cos[c + d*x])/(b^2*d^2) - ((a^2 - b^2)*(e + f*x
)*Log[1 - (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b^3*d) - ((a^2 - b^2)*(e + f*x)*Log[1 - (I*b*E^(I*(c
+ d*x)))/(a + Sqrt[a^2 - b^2])])/(b^3*d) + (I*(a^2 - b^2)*f*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b
^2])])/(b^3*d^2) + (I*(a^2 - b^2)*f*PolyLog[2, (I*b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2])])/(b^3*d^2) + (a*(e
+ f*x)*Sin[c + d*x])/(b^2*d) - (f*Cos[c + d*x]*Sin[c + d*x])/(4*b*d^2) - ((e + f*x)*Sin[c + d*x]^2)/(2*b*d)
Rule 8
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
Rule 2221
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
- Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Rule 2317
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Rule 2438
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]
Rule 2715
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]
Rule 2718
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Rule 3377
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rule 4489
Int[Cos[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Simp[(c + d
*x)^m*(Sin[a + b*x]^(n + 1)/(b*(n + 1))), x] - Dist[d*(m/(b*(n + 1))), Int[(c + d*x)^(m - 1)*Sin[a + b*x]^(n +
1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]
Rule 4615
Int[(Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
Simp[(-I)*((e + f*x)^(m + 1)/(b*f*(m + 1))), x] + (Int[(e + f*x)^m*(E^(I*(c + d*x))/(a - Rt[a^2 - b^2, 2] - I*
b*E^(I*(c + d*x)))), x] + Int[(e + f*x)^m*(E^(I*(c + d*x))/(a + Rt[a^2 - b^2, 2] - I*b*E^(I*(c + d*x)))), x])
/; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && PosQ[a^2 - b^2]
Rule 4621
Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[a/b^2, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] + (-Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n -
2)*Sin[c + d*x], x], x] - Dist[(a^2 - b^2)/b^2, Int[(e + f*x)^m*(Cos[c + d*x]^(n - 2)/(a + b*Sin[c + d*x])), x
], x]) /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[n, 1] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {a \int (e+f x) \cos (c+d x) \, dx}{b^2}-\frac {\int (e+f x) \cos (c+d x) \sin (c+d x) \, dx}{b}-\frac {\left (a^2-b^2\right ) \int \frac {(e+f x) \cos (c+d x)}{a+b \sin (c+d x)} \, dx}{b^2} \\ & = \frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d}-\frac {\left (a^2-b^2\right ) \int \frac {e^{i (c+d x)} (e+f x)}{a-\sqrt {a^2-b^2}-i b e^{i (c+d x)}} \, dx}{b^2}-\frac {\left (a^2-b^2\right ) \int \frac {e^{i (c+d x)} (e+f x)}{a+\sqrt {a^2-b^2}-i b e^{i (c+d x)}} \, dx}{b^2}-\frac {(a f) \int \sin (c+d x) \, dx}{b^2 d}+\frac {f \int \sin ^2(c+d x) \, dx}{2 b d} \\ & = \frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a f \cos (c+d x)}{b^2 d^2}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {f \cos (c+d x) \sin (c+d x)}{4 b d^2}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d}+\frac {f \int 1 \, dx}{4 b d}+\frac {\left (\left (a^2-b^2\right ) f\right ) \int \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right ) \, dx}{b^3 d}+\frac {\left (\left (a^2-b^2\right ) f\right ) \int \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right ) \, dx}{b^3 d} \\ & = \frac {f x}{4 b d}+\frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a f \cos (c+d x)}{b^2 d^2}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {f \cos (c+d x) \sin (c+d x)}{4 b d^2}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d}-\frac {\left (i \left (a^2-b^2\right ) f\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i b x}{a-\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b^3 d^2}-\frac {\left (i \left (a^2-b^2\right ) f\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {i b x}{a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b^3 d^2} \\ & = \frac {f x}{4 b d}+\frac {i \left (a^2-b^2\right ) (e+f x)^2}{2 b^3 f}+\frac {a f \cos (c+d x)}{b^2 d^2}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d}-\frac {\left (a^2-b^2\right ) (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d}+\frac {i \left (a^2-b^2\right ) f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b^3 d^2}+\frac {i \left (a^2-b^2\right ) f \operatorname {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b^3 d^2}+\frac {a (e+f x) \sin (c+d x)}{b^2 d}-\frac {f \cos (c+d x) \sin (c+d x)}{4 b d^2}-\frac {(e+f x) \sin ^2(c+d x)}{2 b d} \\
\end{align*}
Mathematica [B] (verified)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of
optimal. \(816\) vs. \(2(351)=702\).
Time = 2.42 (sec) , antiderivative size = 816, normalized size of antiderivative = 2.32
\[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {8 a b f \cos (c+d x)+2 b^2 d (e+f x) \cos (2 (c+d x))-8 a^2 d e \log \left (1+\frac {b \sin (c+d x)}{a}\right )+8 b^2 d e \log \left (1+\frac {b \sin (c+d x)}{a}\right )+8 a^2 c f \log \left (1+\frac {b \sin (c+d x)}{a}\right )-8 b^2 c f \log \left (1+\frac {b \sin (c+d x)}{a}\right )-a^2 f \left (i (-2 c+\pi -2 d x)^2-32 i \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right ) \arctan \left (\frac {(a-b) \cot \left (\frac {1}{4} (2 c+\pi +2 d x)\right )}{\sqrt {a^2-b^2}}\right )-4 \left (-2 c+\pi -2 d x+4 \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right )\right ) \log \left (1-\frac {i \left (-a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )-4 \left (-2 c+\pi -2 d x-4 \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right )\right ) \log \left (1+\frac {i \left (a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )+4 (-2 c+\pi -2 d x) \log (a+b \sin (c+d x))+8 (c+d x) \log (a+b \sin (c+d x))+8 i \left (\operatorname {PolyLog}\left (2,\frac {i \left (-a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )+\operatorname {PolyLog}\left (2,-\frac {i \left (a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )\right )\right )+b^2 f \left (i (-2 c+\pi -2 d x)^2-32 i \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right ) \arctan \left (\frac {(a-b) \cot \left (\frac {1}{4} (2 c+\pi +2 d x)\right )}{\sqrt {a^2-b^2}}\right )-4 \left (-2 c+\pi -2 d x+4 \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right )\right ) \log \left (1-\frac {i \left (-a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )-4 \left (-2 c+\pi -2 d x-4 \arcsin \left (\frac {\sqrt {\frac {a+b}{b}}}{\sqrt {2}}\right )\right ) \log \left (1+\frac {i \left (a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )+4 (-2 c+\pi -2 d x) \log (a+b \sin (c+d x))+8 (c+d x) \log (a+b \sin (c+d x))+8 i \left (\operatorname {PolyLog}\left (2,\frac {i \left (-a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )+\operatorname {PolyLog}\left (2,-\frac {i \left (a+\sqrt {a^2-b^2}\right ) e^{-i (c+d x)}}{b}\right )\right )\right )+8 a b d (e+f x) \sin (c+d x)-b^2 f \sin (2 (c+d x))}{8 b^3 d^2}
\]
[In]
Integrate[((e + f*x)*Cos[c + d*x]^3)/(a + b*Sin[c + d*x]),x]
[Out]
(8*a*b*f*Cos[c + d*x] + 2*b^2*d*(e + f*x)*Cos[2*(c + d*x)] - 8*a^2*d*e*Log[1 + (b*Sin[c + d*x])/a] + 8*b^2*d*e
*Log[1 + (b*Sin[c + d*x])/a] + 8*a^2*c*f*Log[1 + (b*Sin[c + d*x])/a] - 8*b^2*c*f*Log[1 + (b*Sin[c + d*x])/a] -
a^2*f*(I*(-2*c + Pi - 2*d*x)^2 - (32*I)*ArcSin[Sqrt[(a + b)/b]/Sqrt[2]]*ArcTan[((a - b)*Cot[(2*c + Pi + 2*d*x
)/4])/Sqrt[a^2 - b^2]] - 4*(-2*c + Pi - 2*d*x + 4*ArcSin[Sqrt[(a + b)/b]/Sqrt[2]])*Log[1 - (I*(-a + Sqrt[a^2 -
b^2]))/(b*E^(I*(c + d*x)))] - 4*(-2*c + Pi - 2*d*x - 4*ArcSin[Sqrt[(a + b)/b]/Sqrt[2]])*Log[1 + (I*(a + Sqrt[
a^2 - b^2]))/(b*E^(I*(c + d*x)))] + 4*(-2*c + Pi - 2*d*x)*Log[a + b*Sin[c + d*x]] + 8*(c + d*x)*Log[a + b*Sin[
c + d*x]] + (8*I)*(PolyLog[2, (I*(-a + Sqrt[a^2 - b^2]))/(b*E^(I*(c + d*x)))] + PolyLog[2, ((-I)*(a + Sqrt[a^2
- b^2]))/(b*E^(I*(c + d*x)))])) + b^2*f*(I*(-2*c + Pi - 2*d*x)^2 - (32*I)*ArcSin[Sqrt[(a + b)/b]/Sqrt[2]]*Arc
Tan[((a - b)*Cot[(2*c + Pi + 2*d*x)/4])/Sqrt[a^2 - b^2]] - 4*(-2*c + Pi - 2*d*x + 4*ArcSin[Sqrt[(a + b)/b]/Sqr
t[2]])*Log[1 - (I*(-a + Sqrt[a^2 - b^2]))/(b*E^(I*(c + d*x)))] - 4*(-2*c + Pi - 2*d*x - 4*ArcSin[Sqrt[(a + b)/
b]/Sqrt[2]])*Log[1 + (I*(a + Sqrt[a^2 - b^2]))/(b*E^(I*(c + d*x)))] + 4*(-2*c + Pi - 2*d*x)*Log[a + b*Sin[c +
d*x]] + 8*(c + d*x)*Log[a + b*Sin[c + d*x]] + (8*I)*(PolyLog[2, (I*(-a + Sqrt[a^2 - b^2]))/(b*E^(I*(c + d*x)))
] + PolyLog[2, ((-I)*(a + Sqrt[a^2 - b^2]))/(b*E^(I*(c + d*x)))])) + 8*a*b*d*(e + f*x)*Sin[c + d*x] - b^2*f*Si
n[2*(c + d*x)])/(8*b^3*d^2)
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1749 vs. \(2 (320 ) = 640\).
Time = 1.27 (sec) , antiderivative size = 1750, normalized size of antiderivative =
4.99
| | |
method | result | size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(1750\) |
| | |
|
|
|
[In]
int((f*x+e)*cos(d*x+c)^3/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
[Out]
1/2*I*a*(d*x*f-I*f+d*e)/d^2/b^2*exp(-I*(d*x+c))-2/d/b*a^2*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/
2))/(I*a-(-a^2+b^2)^(1/2)))*x+1/d/b^3*a^4*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b
^2)^(1/2)))*x-2/d/b*a^2*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*x+1/d^
2/b^3*a^4*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*c-2/d^2/b*a^2*f/(-a^
2+b^2)*ln((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*c+1/d^2/b^3*a^4*f/(-a^2+b^2)*ln((I*a
+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*c-2/d^2/b*a^2*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c)
)+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*c+2*I/d^2/b*a^2*f/(-a^2+b^2)*dilog((I*a+b*exp(I*(d*x+c))+(-a^2+b^2
)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))-I/d^2/b^3*a^4*f/(-a^2+b^2)*dilog((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a
+(-a^2+b^2)^(1/2)))+2*I/d^2/b*a^2*f/(-a^2+b^2)*dilog((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(
1/2)))+2*I/d/b^3*a^2*f*c*x-I/d^2/b^3*a^4*f/(-a^2+b^2)*dilog((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2
+b^2)^(1/2)))+2/d^2/b*c*f*ln(exp(I*(d*x+c)))-1/d^2/b*c*f*ln(I*b*exp(2*I*(d*x+c))-I*b-2*a*exp(I*(d*x+c)))+2/d/b
^3*a^2*e*ln(exp(I*(d*x+c)))-1/d/b^3*a^2*e*ln(I*b*exp(2*I*(d*x+c))-I*b-2*a*exp(I*(d*x+c)))-I/d^2/b*f*c^2+1/2*I/
b^3*a^2*f*x^2-1/2*I*a*(d*x*f+I*f+d*e)/d^2/b^2*exp(I*(d*x+c))+1/d*b*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))-(-a^2
+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*x+1/d*b*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^
2+b^2)^(1/2)))*x+1/d^2*b*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*c+1/d
^2*b*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))*c+I/d^2/b^3*a^2*f*c^2-2/d
^2/b^3*c*f*a^2*ln(exp(I*(d*x+c)))+1/d^2/b^3*c*f*a^2*ln(I*b*exp(2*I*(d*x+c))-I*b-2*a*exp(I*(d*x+c)))-I/d^2*b*f/
(-a^2+b^2)*dilog((I*a+b*exp(I*(d*x+c))+(-a^2+b^2)^(1/2))/(I*a+(-a^2+b^2)^(1/2)))-I/d^2*b*f/(-a^2+b^2)*dilog((I
*a+b*exp(I*(d*x+c))-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))+1/d/b^3*a^4*f/(-a^2+b^2)*ln((I*a+b*exp(I*(d*x+c)
)-(-a^2+b^2)^(1/2))/(I*a-(-a^2+b^2)^(1/2)))*x-2*I/d/b*f*c*x+1/16*(2*d*x*f-I*f+2*d*e)/b/d^2*exp(-2*I*(d*x+c))-2
/d/b*e*ln(exp(I*(d*x+c)))+1/d/b*e*ln(I*b*exp(2*I*(d*x+c))-I*b-2*a*exp(I*(d*x+c)))-1/2*I/b*f*x^2+I/b*e*x+1/16*(
2*d*x*f+I*f+2*d*e)/b/d^2*exp(2*I*(d*x+c))-I/b^3*a^2*e*x
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1037 vs. \(2 (315) = 630\).
Time = 0.43 (sec) , antiderivative size = 1037, normalized size of antiderivative = 2.95
\[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Too large to display}
\]
[In]
integrate((f*x+e)*cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="fricas")
[Out]
-1/4*(b^2*d*f*x - 4*a*b*f*cos(d*x + c) - 2*(b^2*d*f*x + b^2*d*e)*cos(d*x + c)^2 - 2*I*(a^2 - b^2)*f*dilog((I*a
*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) - 2*I*
(a^2 - b^2)*f*dilog((I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)
/b^2) - b)/b + 1) + 2*I*(a^2 - b^2)*f*dilog((-I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*
x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + 2*I*(a^2 - b^2)*f*dilog((-I*a*cos(d*x + c) - a*sin(d*x + c) - (b*
cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b + 1) + 2*((a^2 - b^2)*d*e - (a^2 - b^2)*c*f)*lo
g(2*b*cos(d*x + c) + 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) + 2*I*a) + 2*((a^2 - b^2)*d*e - (a^2 - b^
2)*c*f)*log(2*b*cos(d*x + c) - 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) - 2*I*a) + 2*((a^2 - b^2)*d*e -
(a^2 - b^2)*c*f)*log(-2*b*cos(d*x + c) + 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) + 2*I*a) + 2*((a^2 -
b^2)*d*e - (a^2 - b^2)*c*f)*log(-2*b*cos(d*x + c) - 2*I*b*sin(d*x + c) + 2*b*sqrt(-(a^2 - b^2)/b^2) - 2*I*a)
+ 2*((a^2 - b^2)*d*f*x + (a^2 - b^2)*c*f)*log(-(I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(
d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b) + 2*((a^2 - b^2)*d*f*x + (a^2 - b^2)*c*f)*log(-(I*a*cos(d*x + c) - a*
sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b) + 2*((a^2 - b^2)*d*f*x + (a^
2 - b^2)*c*f)*log(-(-I*a*cos(d*x + c) - a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)
/b^2) - b)/b) + 2*((a^2 - b^2)*d*f*x + (a^2 - b^2)*c*f)*log(-(-I*a*cos(d*x + c) - a*sin(d*x + c) - (b*cos(d*x
+ c) - I*b*sin(d*x + c))*sqrt(-(a^2 - b^2)/b^2) - b)/b) - (4*a*b*d*f*x + 4*a*b*d*e - b^2*f*cos(d*x + c))*sin(d
*x + c))/(b^3*d^2)
Sympy [F(-1)]
Timed out. \[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Timed out}
\]
[In]
integrate((f*x+e)*cos(d*x+c)**3/(a+b*sin(d*x+c)),x)
[Out]
Timed out
Maxima [F(-2)]
Exception generated. \[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate((f*x+e)*cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more de
Giac [F]
\[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \cos \left (d x + c\right )^{3}}{b \sin \left (d x + c\right ) + a} \,d x }
\]
[In]
integrate((f*x+e)*cos(d*x+c)^3/(a+b*sin(d*x+c)),x, algorithm="giac")
[Out]
integrate((f*x + e)*cos(d*x + c)^3/(b*sin(d*x + c) + a), x)
Mupad [F(-1)]
Timed out. \[
\int \frac {(e+f x) \cos ^3(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Hanged}
\]
[In]
int((cos(c + d*x)^3*(e + f*x))/(a + b*sin(c + d*x)),x)
[Out]
\text{Hanged}